package com.tjsinfo.tjsoa.workReport.action;



import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.apache.struts.action.Action;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionForward;
import org.apache.struts.action.ActionMapping;
import com.tjsinfo.tjsoa.workReport.bo.TResourceWorkReportManage;


public class WorkReportDeleteAction extends Action {
	private TResourceWorkReportManage resourceWorkReportManage;
	
	

	public TResourceWorkReportManage getResourceWorkReportManage() {
		return resourceWorkReportManage;
	}



	public void setResourceWorkReportManage(
			TResourceWorkReportManage resourceWorkReportManage) {
		this.resourceWorkReportManage = resourceWorkReportManage;
	}



	public ActionForward execute(ActionMapping mapping, ActionForm form,
			HttpServletRequest request, HttpServletResponse response) {
		
		try {
			Integer id= Integer.parseInt(request.getParameter("id"));
			resourceWorkReportManage.delete(id);
			

			return mapping.findForward("success");
		} catch (Exception e) {
			e.printStackTrace();
			return mapping.findForward("failed");
		}
	}

}
